package fr.bda.kanban;

import java.util.ArrayList;
import java.util.List;

public class Step {

	private Configuration configuration = new Configuration();
	private List<Condition> inputConditions = new ArrayList<>();
	private List<Condition> outputConditions = new ArrayList<>();

	public Configuration getConfiguration() {
		return configuration;
	}

	public void setConfiguration(Configuration configuration) {
		this.configuration = configuration;
	}

	public List<Condition> getInputConditions() {
		return inputConditions;
	}

	public List<Condition> getOutputConditions() {
		return outputConditions;
	}

	public void setInputConditions(List<Condition> inputConditions) {
		this.inputConditions = inputConditions;
	}

	public void setOutputConditions(List<Condition> outputConditions) {
		this.outputConditions = outputConditions;
	}

	@Override
	public int hashCode() {
		final int prime = 31;
		int result = 1;
		result = prime * result + ((configuration == null) ? 0 : configuration.hashCode());
		result = prime * result + ((inputConditions == null) ? 0 : inputConditions.hashCode());
		result = prime * result + ((outputConditions == null) ? 0 : outputConditions.hashCode());
		return result;
	}

	@Override
	public boolean equals(java.lang.Object obj) {
		if (this == obj)
			return true;
		if (obj == null)
			return false;
		if (getClass() != obj.getClass())
			return false;
		Step other = (Step) obj;
		if (configuration == null) {
			if (other.configuration != null)
				return false;
		} else if (!configuration.equals(other.configuration))
			return false;
		if (inputConditions == null) {
			if (other.inputConditions != null)
				return false;
		} else if (!inputConditions.equals(other.inputConditions))
			return false;
		if (outputConditions == null) {
			if (other.outputConditions != null)
				return false;
		} else if (!outputConditions.equals(other.outputConditions))
			return false;
		return true;
	}

}
